package com.tianqu.tms.entity;

import java.sql.Timestamp;

import com.tianqu.tms.core.base.TmsEntity;
import com.tianqu.tms.core.exception.TmsDaoException;
import com.tianqu.tms.core.exception.TmsException;
import com.tianqu.tms.dao.TmsApiLogDaoImp;
import com.tianqu.tms.dao.TmsDao;
import com.tianqu.tms.dto.TmsApiLogDto;

/**
 * @author Huang Wei
 *
 */
public class TmsApicLogInfo  extends TmsEntity {
	
	private int funcType;
	   
	private String dataInfo;
	   
	private String reason;
	   
	private int updateUserId;
	   
	private Timestamp updateTime;
	   
	public void insertApiLog(TmsApicLogInfo entity) throws TmsDaoException
	{
		TmsApiLogDaoImp dao = (TmsApiLogDaoImp) TmsDao.getInstance(TmsDao.TMS_API_LOG);
		TmsApiLogDto dto  = new TmsApiLogDto();
		dto.setDataInfo(entity.getDataInfo());
		dto.setFuncType(entity.getFuncType());
		dto.setReason(entity.getReason());
		dto.setUpdateUserId(entity.getUpdateUserId());
		dao.insertTmsApiLog(dto);
	}
	
	@Override
	public void save() throws TmsDaoException, TmsException {}

	public int getFuncType() {
		return funcType;
	}

	public void setFuncType(int funcType) {
		this.funcType = funcType;
	}

	public String getDataInfo() {
		return dataInfo;
	}

	public void setDataInfo(String dataInfo) {
		this.dataInfo = dataInfo;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public int getUpdateUserId() {
		return updateUserId;
	}

	public void setUpdateUserId(int updateUserId) {
		this.updateUserId = updateUserId;
	}

	public Timestamp getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Timestamp updateTime) {
		this.updateTime = updateTime;
	}

	
}
